#pragma once
#include <stdio.h>

#include "../../Shape/PointCloudPatch.h"
#include "../SegmentationGraph.h"

#define N_FOR_CRAWL 6

namespace PCS
{
	namespace Core
	{				
		class Splicer
		{
		protected:
			int m_id;

		public:			
			Splicer(void) {  }
			Splicer(int p_id) { m_id = p_id; }  

			/**Crawl nearby points and include in p_pointCloudPatch those with the same type .. include in neighbourPoints those with a different type*/
			PointCloudPatch * Crawl(Point* &p_seed, SparseGrid* &p_sg, std::map<std::string, SegmentationGraph::pcp_neighbour*> &point_pairs) {
				PointCloudPatch::patch_type;
				if (p_seed->T == Point::surface) { pcp_type = PointCloudPatch::surface; }
				else if (p_seed->T == Point::edge) { pcp_type = PointCloudPatch::edge; }				
				PointCloudPatch * new_patch = new PointCloudPatch(patch_type, 1, "pcp1");
				
				return new_patch;
			}




		};		

	}
}